package com.kn

class Accnt {

    String name

    static belongsTo = [ groupAccount:com.kn.GroupAccount ]

    String accountID
    String billingAccountID
    AccountType type
    String payPlan
    RepNum repNum
    BillingSchedule billingSchedule


//    static searchable = [only: ['accountID', 'billingAccountID', 'name']]

    static constraints = {
        accountID(unique:true)
        billingAccountID(unique:false)
        name(blank:false, maxSize:50)
        type(nullable:false)
        payPlan(inList:["Advance", "Arrears"])
        repNum(nullable:true)
        billingSchedule(nullable:true)

   }

    String toString() {
        "${this.name}"
    }


}
